package com.wzh.design.cor.cor3;

/**
 * @description: 职责链模式
 * @author: WZH
 * @time: 2021/5/31 15:59
 */
public class ConcreteHandler1 extends Handler {


    @Override
    public void handleMessage(int type) {
        if(type == 1 || type == 3){
            System.out.println("ConcreteHandler1 解决了问题");
        }else {
            System.out.println("ConcreteHandler1 解决不了问题");

            if(nextHandle != null){
                nextHandle.handleMessage(type);
            }else {
                System.out.println("没有人能处理得了");
            }

        }
    }


}
